﻿using DFGK_WMS.Model.Dto;
using DFGK_WMS.Model.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK.IService
{
    public interface IMenuService
    {
        /// <summary>
        /// 添加菜单
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool AddMenuItem(Menu m);

        /// <summary>
        /// 获取菜单列表
        /// </summary>
        /// <param name="mname"></param>
        /// <param name="status"></param>
        /// <returns></returns>
        List<MenuDto> GetMenuList(string mname, int status);

        /// <summary>
        /// 删除菜单
        /// </summary>
        /// <param name="mid"></param>
        /// <returns></returns>
        bool DelMenuItem(long mid);

        /// <summary>
        /// 加载分配权限列表
        /// </summary>
        /// <returns></returns>
        List<MenuRoleMenuActionDto> GetMenuActionList(long rid);

        /// <summary>
        /// 分配权限
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool AddRoleMenuAction(CRoleMenuAction m);

        /// <summary>
        /// 根据ID获取详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Menu? GetMenuItem(long id);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool UpdMenuItem(Menu m);
    }
}
